from PIL import Image
import numpy as np

array = np.array([[0, 255] * 10, [255, 0] * 10] * 10, dtype=np.uint8)
image = Image.fromarray(array, mode="L")
image.show()
